package atom.core3.apache.http4.ssl;

import java.security.KeyStore;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import javax.net.ssl.SSLContext;

import org.apache.http.conn.ssl.SSLContextBuilder;
import org.apache.http.conn.ssl.TrustStrategy;

public class SSLContextUtil {

	public static SSLContext getSSLContext() throws Exception
	{
        SSLContext e = (new SSLContextBuilder()).loadTrustMaterial((KeyStore)null, new TrustStrategy() {
            public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
                return true;
            }
        }).build();		
        
        return e;
	}
}
